script.
  $(function() {
    var carousel = $('#carousel');
    var controlBtn = carousel.find('.control-btn');
    var carouselContent = carousel.find('.carousel-content');
    var carouselContentBox = carousel.find('.carousel-content .box');

    carouselContent.css({
      width: 100*carouselContentBox.length + '%'
    });

    carouselContentBox.css({
      width: 100/carouselContentBox.length + '%'
    });

    $('#carousel .control-btn').click(function(e) {
      var _this = this;
      var index = $(_this).index();
      carouselContent.animate({left: -100*index + '%'}, 300);
      controlBtn.removeClass('selected').eq(index).addClass('selected');
    });
  });
